<!DOCTYPE html>
<html>
<head>

    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    
    <title>Infowindow Example</title>
    
    <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" 
    			rel="stylesheet" 
                type="text/css" />
    
    <!-- Google Maps API -->          
    <script type="text/javascript" 
			src="http://maps.google.com/maps/api/js?v=3.5&sensor=false">
    </script>
    
    <script type="text/javascript">
    
	  // Karte initialisieren
      function initialize() {
        var myLatlng = new google.maps.LatLng(52.5234051,13.411399);
        
		// Kartenoptionen
		var myOptions = {
          zoom: 5,
          center: myLatlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        }
        
		// Karte
        var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        
        // Content InfoWindow
        var content = "Hallo Berlin!";
        
        // InfoWindow initialisieren
        var infowindow = new google.maps.InfoWindow({
            content: content
        });
        
        // Marker auf der Karte platzieren
        var marker = new google.maps.Marker({
            position: myLatlng, 
            map: map,
            title:"Hello World!"
        }); 
        
        // Actionlistener: Mittels Klick auf den Marker InfoWindow öffnen
        google.maps.event.addListener(marker, 'click', function() {
            infowindow.open(map,marker);
        }); 
         
      }
    </script>
</head>

<body onload="initialize()">
	
    <!-- Kartendarstellung -->
 	<div id="map_canvas">
  
  	</div>
  
</body>

</html>
